package com.kyivmohyla.kma2.client.events.engineer;

import com.google.gwt.event.shared.GwtEvent;
import com.kyivmohyla.kma2.shared.model.UIStaff;

public class EngineerLoginEvent extends GwtEvent<EngineerLoginEventHandler> {
    public static Type<EngineerLoginEventHandler> TYPE = new Type<EngineerLoginEventHandler>();
    private final UIStaff engineerStaff;

    public EngineerLoginEvent(UIStaff engineerStaff) {
        this.engineerStaff = engineerStaff;
    }

    public UIStaff getEngineerStaff() {
        return engineerStaff;
    }


    public Type<EngineerLoginEventHandler> getAssociatedType() {
        return TYPE;
    }

    protected void dispatch(EngineerLoginEventHandler handler) {
        handler.onEngineerLogin(this);
    }
}
